import java.util.Scanner;

public class Solution {
    public int mysqrt (int x){
        if(x == 1){
            return 1;
        }
        int left = 1;
        int right = x;
        while(left <= right){
            int mid = (left+right)/2;
            if(mid<=x/mid && (mid+1)>x/(mid+1)){
                return mid;
            }
            if(mid>x/mid){
                right = mid-1;
            }else{
                left = mid+1;
            }
        }
        return 0;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()){
            int num = in.nextInt();
            Solution solution = new Solution();
            int sqrt = solution.mysqrt(num);
            System.out.println(sqrt);
        }
    }
}
